package com.mudingkou.mos.common.enums;


import com.mudingkou.mos.common.Message;

/**
 * 常见的结果枚举
 * <p>通用返回结果</p>
 * @author kzc
 * @date 2020/5/2
 */
public enum CommonResultEnum implements Message {
    /**
     * 成功
     */
    SUCCESS(0, "成功"),
    /**
     * 未知错误
     */
    ERROR_UNKNOWN(-1, "未知错误");


    CommonResultEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 代码
     */
    private final int code;
    /**
     * 消息
     */
    private final String message;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
